/*

Author   : chaos

FileName : obj_ptr.cpp

Date     : 12/08/17 12:58:15

*/
#include <iostream>
#include <cstring>
using namespace std;

class Book
{
    private:
        char name[30];
        long index;
    public:
        Book(char * i_name):index(-1)
    {
        strcpy(name,i_name);
    }

        void show_data()
        {
            cout << " name : " << name << " index :" << index << endl;
        }
};

int main(int argc ,char *argv[])
{
    Book A_Book("The C++ Bible");
    Book *book_ptr = &A_Book;

    book_ptr->show_data();
    return 0;
}
